Skip to content

Make clang-tidy work in parallel#9108

Merged
tjzel merged 11 commits into
mainfrom
@wisniewskij/make-clangtidy-work-in-parallel
Mar 19, 2026
Merged

Make clang-tidy work in parallel#9108
tjzel merged 11 commits into
mainfrom
@wisniewskij/make-clangtidy-work-in-parallel

Conversation

@wisniewskij

@wisniewskij wisniewskij commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Current clang-tidy configuration is painfully slow (because it runs synchronously on one thread) + from what I understand, passing .h files in a way it's currently done, is not suggested and it can cause some problems with errors not being displayed properly (some errors in .h files are displayed as warnings, which can cause problems).

I changed the configuration to use "run-clang-tidy" script which enables us to fix both of those issues. Additionally I fixed all the issues that are now caught in the .h files by the script.

Test plan

in both packages/react-native-worklets and packages/react-native-reanimated run yarn lint:clang-tidy

@wisniewskij

Copy link
Copy Markdown
Contributor Author

After this is merged we have to check if it works properly with the CI (if the run-clang-tidy script can be run by the CI).

Also merged commit should be included in .git-blame-ignore-revs

@wisniewskij wisniewskij force-pushed the @wisniewskij/make-clangtidy-work-in-parallel branch from 02a2888 to 3a8cf58 Compare March 16, 2026 15:39
Comment thread scripts/clang-tidy-lint.sh Outdated
@wisniewskij

wisniewskij commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

Just run the lint-clang-tidy workflow on this branch and it passed. Now I will push a commit that should make it fail.

@wisniewskij wisniewskij force-pushed the @wisniewskij/make-clangtidy-work-in-parallel branch from 4e0310c to 0685361 Compare March 16, 2026 16:25
@wisniewskij

Copy link
Copy Markdown
Contributor Author

It failed as expected. Now It's ready for review.

@wisniewskij wisniewskij requested review from MatiPl01 and tjzel March 16, 2026 16:55
@wisniewskij wisniewskij self-assigned this Mar 16, 2026
@wisniewskij wisniewskij marked this pull request as ready for review March 16, 2026 16:55

@MatiPl01 MatiPl01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some suggestions for possible improvements.

Comment thread scripts/clang-tidy-lint.sh Outdated

@MatiPl01 MatiPl01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but wait for @tjzel to approve as well

@tomekzaw tomekzaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid!

@tjzel tjzel added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 87e0f33 Mar 19, 2026
23 checks passed
@tjzel tjzel deleted the @wisniewskij/make-clangtidy-work-in-parallel branch March 19, 2026 17:17
tshmieldev pushed a commit that referenced this pull request Mar 24, 2026
## Summary
Current clang-tidy configuration is painfully slow (because it runs
synchronously on one thread) + from what I understand, passing .h files
in a way it's currently done, is not suggested and it can cause some
problems with errors not being displayed properly (some errors in .h
files are displayed as warnings, which can cause problems).

I changed the configuration to use "run-clang-tidy" script which enables
us to fix both of those issues. Additionally I fixed all the issues that
are now caught in the .h files by the script.

## Test plan

in both `packages/react-native-worklets` and
`packages/react-native-reanimated` run `yarn lint:clang-tidy`

---------

Co-authored-by: Tomasz Żelawski <tzelawski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants